<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic"%>
<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html"%>
<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean"%>
<%@ taglib uri="/WEB-INF/displaytag.tld" prefix="display" %>
<%@ page import="com.cs.beneficios.business.model.AreaVO,java.util.List"%>

<script language="JavaScript" src="<%= request.getContextPath() + "/js/calendar6.js" %>"></script>
<script language="JavaScript" src="<%= request.getContextPath() + "/js/popUP.js" %>"></script>

<%@ page contentType="text/html;charset=utf-8"%>

<html>
  <head> 
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <title>M&oacute;dulo de Secretarias</title>
    <link href="../../css/jdeveloper.css" rel="stylesheet" media="screen"/>
    <script language="JavaScript"> 
       
       function validardatos(locacion1){
        if(document.frmModisecretarias.nombrearea.value != "")
        {
          document.frmModisecretarias.opcion.value='2';
          document.frmModisecretarias.action=locacion1;
          document.frmModisecretarias.submit();          
        }else
        {
          alert("Por favor ingrese el nombre de la secretaria");
        }
      }
      
      function enviar(locacion1)
      {
        document.frmModisecretarias.action=locacion1;
        document.frmModisecretarias.submit();
      }
              
    </script>
  
  </head>
  <body>
  
   <link href="<%= request.getContextPath() + "/css/bloques.css" %>" rel="stylesheet" type="text/css"> 
    <P align="center" class="titulosenblanco">M&oacute;dulo de Secretarias</P>
    <form name="frmModisecretarias" method="get">
      <logic:iterate length="1" id="area" name="ListaArea" type="com.cs.beneficios.business.model.AreaVO">
        <table border="0" width="50%" height="34" align="center" cellspacing="1" cellpadding="2">
          
          <tr>
            <td>
              <DIV align="left" class="celdatabla">
                <STRONG>Nombre</STRONG>
              </DIV>
            </td>
            <td>
              <input type="text" name="nombrearea" size="40" value="<bean:write name="area" property="nombre"/>" maxlength="99" class="form"/>
            </td>
          </tr>
           <tr align="left">
            <td>
              <DIV align="left" class="celdatabla">
                <strong>Descripci&oacute;n</strong>
              </DIV>
            </td>
            <td>
              <DIV align="left">
                <input type="text" name="descripcionarea" value="<bean:write name="area" property="descripcion"/>" size="40" maxlength="199" class="form"/>
              </DIV>
            </td>
          </tr>
        </table>
      </logic:iterate>
      <br/>
      <logic:present scope="request" name="msgmodificar">
        <strong><DIV align="center"><%=(String)request.getAttribute("msgmodificar")%></DIV></strong>
        <BR/>
      </logic:present>
      
      <br/>
      <div align="center">
        <%String Ruta = "'"+request.getContextPath() + "/Areas/ModificationAreas.do'";%>
        <input type="HIDDEN" name="opcion"/>
        <input type="BUTTON" value="Modificar" onclick="validardatos(<%=Ruta%>)"/>
        <br/>
        <br/>
        <% String Ruta2 = "'"+request.getContextPath() + "/Areas/ModuloAreas.do'"; %>
        <input type="image" onclick="enviar(<%=Ruta2%>)" src="<%= request.getContextPath() + "/images/b_atras.gif"%>"/>
      </div>
      <br/>
    </form>
  </body>
</html>
